package com.cn.utils;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class LogUtils3 implements MethodInterceptor {
    @Override
    public Object invoke(MethodInvocation arg0) throws Throwable {
        logBefore();
        Object obj=arg0.proceed();
        logAfter();
        return obj;
    }

    public void logBefore() {
        System.out.println("方法执行前日志记录！");
    }

    public void logAfter() {
        System.out.println("方法执行后日志记录！");
    }
}
